
import { Axios, base, req } from './axiosFun';

// 设备列表
export const equipmentList = (params) => {
  return Axios({
    url: `${base}/equipment/list`,
    method: 'GET',
    params   //传入进来的参数
  })
}

// 设备列表详情
export const equipmentDetrails = (params) => {
  return Axios({
    url: `${base}/equipment/detail`,
    method: 'GET',
    params   //传入进来的参数
  })
}

// 限制
function limitList(params){
  return Axios({
    url: `${base}/equipment/xianzhi`,
    method: 'GET',
    params   //传入进来的参数
  })
}

// 右上角限制
function YoulimitList(params){
  return Axios({
    url: `${base}/equipment/quanzhi`,
    method: 'GET',
    params   //传入进来的参数
  })
}

// 设备新增   
function newEqui(data){
  return Axios({
    url: `${base}/equipment/save`,
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data   //传入进来的参数
  })
}

// 设备新增的选择机构
function chooseTions(params){
  return Axios({
    url: `${base}/equipment/AddBYid`,
    method: 'GET',
    params   //传入进来的参数
  })
}

// 设备批量新增
function piLiangXinz(params){
  return Axios({
    url: `${base}/equipment/Daochu`,
    method: 'GET',
    responseType: 'blob',
    params   //传入进来的参数
  })
}

// 设备批量新增
function piLiangXinAdd(data){
  return Axios({
    url: `${base}/equipment/importAdd`,
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data   //传入进来的参数
  })
}

// 设备解除限制操作中
function piLiangRrelieve(params){
  return Axios({
    url: `${base}/equipment/relieve`,
    method: 'GET',
    params   //传入进来的参数
  })
}

// 设备解除限制多选
function piLiangReqrelieve(params){
  return Axios({
    url: `${base}/equipment/eqrelieve`,
    method: 'GET',
    params   //传入进来的参数
  })
}

export default {
  equipmentList,
  equipmentDetrails,
  limitList,
  newEqui,
  chooseTions,
  YoulimitList,
  piLiangXinz,
  piLiangXinAdd,
  piLiangRrelieve,
  piLiangReqrelieve,
  
}
